﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class News : System.Web.UI.Page
{
    string ID = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        ID = Request.QueryString["id"];
        if(string.IsNullOrEmpty(ID))
            Response.Redirect("~/index.aspx");
        if (!IsPostBack)
        {
            NewsData nd = new NewsData();
            nd.ID = new Guid(ID);            
            DataTable tb = NewsDataDBOption.DataTableSelect(nd);    
            DataRow dr=tb.Rows[0];
            TitleLiteral1.Text = dr["Title"].ToString();
            TxtLiteral1.Text = dr["Txt"].ToString();
        }
    }
}